package Prototype.improve;

/**
 * @Author liangliangzhao
 * @data 2023/3/5 10:42
 */

public class Client {

    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom", 1, "白色");

        sheep.friend = new Sheep("jack",2,"黑色");


        Sheep sheep1 = (Sheep)sheep.clone();
        Sheep sheep2 = (Sheep)sheep.clone();
        Sheep sheep3 = (Sheep)sheep.clone();
        Sheep sheep4 = (Sheep)sheep.clone();

        System.out.println(sheep);
        System.out.println(sheep1+"==>"+sheep1.friend.hashCode());
        System.out.println(sheep2+"==>"+sheep2.friend.hashCode());
        System.out.println(sheep3+"==>"+sheep3.friend.hashCode());
        System.out.println(sheep4+"==>"+sheep4.friend.hashCode());
    }
}
